# -*- coding: utf-8 -*-
from db.model import Model

# 程序主入口
if __name__ == '__main__':

    m = Model('blog')
    print(m.fields)

    u = Model('users')
    print(u.fields)

    # print(m)

    # dlist=m.findAll()
    # for dd in dlist:
    #     print(dd)

    # print(m.find())

    # dlist = m.select(where=["uid=1", "flag=1"],order='title asc',limit=3)
    # for dd in dlist:
    #     print(dd)

    # i=m.save({'title':'bt1086', 'abstract':'zhaiyao10086', 'content':'neirong10086', 'uid':6, 'pcount':10086, 'flag':1, 'cdate':'2018-01-02 14:30:25'})
    # print(i)
    # i = m.update({"id": 6, "title": "bt132"})
    # print(i)
    # print(m.delete(id=27))
